﻿<%@page import="itsm.isperp.framework.core.context.ContextHolder"%>
<%@ page pageEncoding="UTF-8"%>
<%@ taglib prefix="isperp" uri="/WEB-INF/tlds/isperp.tld"%>

<style type="text/css">
#baidumap { /* margin-right: 130px; */
	height: 100%;
	overflow: hidden;
}

#result {
	border-left: 1px dotted #999;
	height: 100%;
	width: 126px;
	position: absolute;
	top: 0px;
	right: 0px;
	font-size: 12px;
}

dt {
	font-size: 14px;
	font-family: "微软雅黑";
	font-weight: bold;
	border-bottom: 1px dotted #000;
	padding: 5px 0 5px 5px;
	margin: 5px 0;
}

dd {
	padding: 5px 0 0 5px;
}
</style>

<link rel="stylesheet"
	href="http://api.map.baidu.com/library/DrawingManager/1.4/src/DrawingManager_min.css" />

<script type="text/javascript"
	src="http://api.map.baidu.com/api?v=2.0&ak=<%=ContextHolder.getConfigByKey("baiduApk")%>"></script>
<script type="text/javascript"
	src="http://api.map.baidu.com/library/DrawingManager/1.4/src/DrawingManager_min.js"></script>

<script type="text/javascript" src="js/libs/raty/jquery.raty.js"></script>

<script src="js/libs/layer/layer.js" type="text/javascript"></script>

<script type="text/javascript"
	src="http://api.map.baidu.com/library/GeoUtils/1.2/src/GeoUtils_min.js"></script>
<script src="js/widget/baiduMap.js" type="text/javascript"></script>

<div>
	<div style="width:730px;margin:auto;">
		要查询的地址：<input id="text_" type="text" value="宁波天一广场"
			style="margin-right:100px;" /> 查询结果(经纬度)：<input id="result_"
			type="text" /> <input type="button" value="查询"
			onclick="searchByStationName();" />
		<div id="container"
			style="position: absolute;
                margin-top:30px; 
                width: 730px; 
                height: 590px; 
                top: 50; 
                border: 1px solid gray;
                overflow:hidden;">
		</div>
	</div>

	<div style="">

		<span style="font-size:16px;font-weight: bold;">在线设备：<span
			id="ci_total">0</span>台，离线设备<span style="color:red" id="ci_outStatus">0</span>台</span>
	</div>
</div>

<div id="allmap" style="overflow: hidden; zoom: 1; position: relative;">
	<div id="baidumap"
		style="height: 100%; -webkit-transition: all 0.5s ease-in-out; transition: all 0.5s ease-in-out;">
	</div>
	<div id="panelWrap"
		style="width: 0px; position: absolute; top: 0px; right: 0px;
            height: 100%; overflow: auto; -webkit-transition: all 0.5s ease-in-out; transition: all 0.5s ease-in-out;">
	</div>
</div>

<!-- <div id="result">
	<dl>
		<dd>
			<ul>
				<li><span id="timeoutReciprocalValue" class="important-info"></span>秒后自动<a
					style="padding:0px" href="javascript:void()" class="nui-txt-link"
					onclick="refreshPoint();return false;">刷新坐标</a>
				</li>
			</ul>
		</dd>
		<dt style="display:none">位置信息</dt>
		<dd>
			<ul>
				<li style="display:none"><input id="cbUser" type="checkbox"
					checked="checked" onclick="changePoint()"><label
					for="cbUser">人员</label> <input id="cbIncident" type="checkbox"
					onclick="changePoint()" checked="checked"><label
					for="cbIncident">事件</label>
				</li>
				<li><br></li>
				<li></li>
			</ul>
		</dd>
	</dl>
</div> -->




<script type="text/javascript">
	var bm = $("#baidumap").baiduMap({
		refreshTimeoutLabel : "timeoutReciprocalValue",
		centerPointLng : 118.5886000000,
		centerPointLat : 37.5564990000,
		showIncidentPoint : false,
		showUserPoint : false
	});

	function searchByStationName() {
		var myGeo = new BMap.Geocoder();
		// 将地址解析结果显示在地图上,并调整地图视野
		myGeo.getPoint("清远市清新县", function(point) {
			if (point) {
			   alert(point.lat);
			   alert(point.lng);
			} else {
				alert("您选择地址没有解析到结果!");
			}
		}, "广州市");
	}
	bm.height($(window).height());

	function refreshPoint() {
		bm.baiduMap("refreshPoint");
	}
	function clearAllPoint() {
		bm.baiduMap("clearAllPoint");
	}

	function changePoint() {
		var cbUserChecked = $("#cbUser").is(":checked");
		var cbIncidentChecked = $("#cbIncident").is(":checked");

		bm.baiduMap("showUserPoint", cbUserChecked);
		bm.baiduMap("showIncidentPoint", cbIncidentChecked);
		refreshPoint();
	}
</script>